package com.module.ble.listener

import com.module.ble.db.table.UserBloodOxygen
import com.module.ble.db.table.UserBodyTemperature
import com.module.ble.db.table.UserHeartRate

/**
 *
 * 作者：sosou
 *
 * 版本：1.0
 *
 * 创建日期：4/3/2023
 *
 * 描述：
 *
 * 修订历史：
 *
 */
interface CusSdkSettingExpandListener {
    fun onCurrentActivityGoals(data: String?=null)
    fun onDeviceDataSyncTime(state: Boolean = false)
}

interface CusConnectBleDeviceExpandListener {
//    fun onConnectFirst(macStr:String?)//首次初始化sdk时连接（只在绑定页面触发）
    fun onConnect(macStr:String?)//设备已连接
    fun onConnectError(macStr:String?,throwable: Throwable?, state: Int)//设备连接错误
    fun onDisconnect(macStr:String?)//设备断开连接
    fun onHandleDevice(type:Int = 0,result: Boolean = false)//类型：int1：重置戒指2：解绑戒指4：重启戒指（即恢复出厂）
    fun onBoundDeviceResult(macStr:String,result: Boolean = false)//绑定结果
}

interface CusBleDeviceInfoExpandListener {
    fun onDevicePowerState(electricity: String = "",workingMode: Int =0)//获取电量信息
    fun onGetDeviceInfo()//获取设备信息

}


interface CusSynthesisHealthExpandListener {
    fun onLatestHr(value:Int, macStr:String, time:Long)
    fun onHeartRateDataListResult(result:List<UserHeartRate>)

    fun getLatestBloodOxygen(value:Int, macStr:String, time:Long)
    fun onBloodOxygenDataListResult(result:List<UserBloodOxygen>)

    fun onLatestBodyTemper(value:Float, macStr:String, time:Long)
    fun onBodyTemperDataListResult(result:List<UserBodyTemperature>)

    fun onMeasureResult(result:Boolean,type:Int,time:Long,heartRate:Int,bloodOxygen:Int,bodyTemp:Float,envTemp:Float)

}

interface CusSportMonitorDataExpandListener {
    fun sportStart(result:Boolean,sportId : Long, ringFirm: String)
    fun sportPause(result:Boolean)
    fun sportResume(result:Boolean)
    fun sportStop(result:Boolean)
    fun sportInfo(type: Int, timestamp: Long, step: Int, distance: Int, cal: Int, cursleeptime: Int, totalrunningtime: Int, teptime: Int)
}